//
//  ZBThreeView.m
//  MoBan
//
//  Created by apple on 16/7/11.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "ZBThreeView.h"
@interface ZBThreeView()
@property(nonatomic,strong)UILabel *namelable;
@property(nonatomic,strong)UILabel *detaillable;
@property(nonatomic,strong)UIImageView *imageview;
@property(nonatomic,strong)UIImageView *arrowImageview;
@property(nonatomic,strong)UILabel *priceLable;
@end
@implementation ZBThreeView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addUI];
    }
    return self;
}
-(void)addUI
{
    self.namelable = [[UILabel alloc]init];
    self.namelable.text = @"颐和烤鸭放";
    [self addSubview:self.namelable];
    
    self.detaillable = [[UILabel alloc]init];
    self.detaillable.text =@"么天时间开始";
    [self addSubview:self.detaillable];
    
    self.priceLable = [[UILabel alloc]init];
    self.priceLable.text = @"87元";
    [self addSubview:self.priceLable];
    
    self.imageview = [[UIImageView alloc]init];
    self.imageview.image = [UIImage imageNamed:@"text.png"];
    [self addSubview:self.imageview];
    
    self.arrowImageview = [[UIImageView alloc]init];
    self.arrowImageview.backgroundColor = [UIColor blackColor];
    [self addSubview:self.arrowImageview];
    
//    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(viewclicted:)];
//    [self addGestureRecognizer:tap];

}
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.imageview.frame =CGRectMake(10*Kscr, 10*Kscr,self.height-20*Kscr , self.height-20*Kscr);
    
    self.namelable.frame = CGRectMake(self.imageview.right+10*Kscr, 5*Kscr, 100*Kscr, 20*Kscr);
    
    self.priceLable.frame = CGRectMake(self.namelable.right+5*Kscr, 5*Kscr, 100*Kscr, 20*Kscr);
    
    self.detaillable.frame = CGRectMake(self.imageview.right+10*Kscr, self.namelable.bottom+5*Kscr, 200*Kscr, 20*Kscr);
    self.arrowImageview.frame = CGRectMake(KscrW-60*Kscr,20*Kscr , 13*Kscr, 20*Kscr);
    

}
-(void)ZBDatasouce:(NSMutableArray *)array
{
    self.namelable.text = array[0];
    [self ZBsetPriceLableFram];

}
//-(void)viewclicted:(UIGestureRecognizer *)tap
//{
//    if ([self.deleget respondsToSelector:@selector(ZBCellClic)]) {
//        [self.deleget ZBCellClic];
//    }
//
//}
-(void)ZBsetPriceLableFram
{
    
}

@end
